from selenium import webdriver


class SeleniumUtil(object):

    _driver = webdriver.Chrome(r"C:\Users\wangz\AppData\Local\Google\Chrome\Application\chromedriver.exe")

    @classmethod
    def getUrl(cls, url):
        cls._driver.get(url)

    @classmethod
    def set(cls, type, key, value):
        SeleniumUtil._driver.find_element(type, key).send_keys(value)

    @classmethod
    def click(cls, type, key):
        SeleniumUtil._driver.find_element(type, key).click()
